package com.neiquan.secondhand.po;


import com.neiquan.backstage.core.bsc.CRUD;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.List;

/**
 * 字段表
 * Created by luochenxi on 2016/7/27.
 */
@Entity
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicUpdate = true)
@Table(name = "sys_dictionaries")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@CRUD
public class Dictionaries {

    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid.hex")

    @Column(name = "DICTIONARIES_ID", unique = true, nullable = false)
    private String DICTIONARIES_ID;	//主键
    private String NAME;			//名称
    private String NAME_EN;			//英文名称
    private String BIANMA;			//编码
    private String ORDER_BY;		//排序
    private String PARENT_ID;		//上级ID
    private String BZ;				//备注
    private String TBSNAME;			//关联表
    @Transient
    private String target;
    @Transient
    private Dictionaries dict;
    @Transient
    private List<Dictionaries> subDict;
    @Transient
    private boolean hasDict = false;
    @Transient
    private String treeurl;

    public String getDICTIONARIES_ID() {
        return DICTIONARIES_ID;
    }

    public void setDICTIONARIES_ID(String DICTIONARIES_ID) {
        this.DICTIONARIES_ID = DICTIONARIES_ID;
    }

    public String getNAME() {
        return NAME;
    }

    public void setNAME(String NAME) {
        this.NAME = NAME;
    }

    public String getNAME_EN() {
        return NAME_EN;
    }

    public void setNAME_EN(String NAME_EN) {
        this.NAME_EN = NAME_EN;
    }

    public String getBIANMA() {
        return BIANMA;
    }

    public void setBIANMA(String BIANMA) {
        this.BIANMA = BIANMA;
    }

    public String getORDER_BY() {
        return ORDER_BY;
    }

    public void setORDER_BY(String ORDER_BY) {
        this.ORDER_BY = ORDER_BY;
    }

    public String getPARENT_ID() {
        return PARENT_ID;
    }

    public void setPARENT_ID(String PARENT_ID) {
        this.PARENT_ID = PARENT_ID;
    }

    public String getBZ() {
        return BZ;
    }

    public void setBZ(String BZ) {
        this.BZ = BZ;
    }

    public String getTBSNAME() {
        return TBSNAME;
    }

    public void setTBSNAME(String TBSNAME) {
        this.TBSNAME = TBSNAME;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public Dictionaries getDict() {
        return dict;
    }

    public void setDict(Dictionaries dict) {
        this.dict = dict;
    }

    public List<Dictionaries> getSubDict() {
        return subDict;
    }

    public void setSubDict(List<Dictionaries> subDict) {
        this.subDict = subDict;
    }

    public boolean isHasDict() {
        return hasDict;
    }

    public void setHasDict(boolean hasDict) {
        this.hasDict = hasDict;
    }

    public String getTreeurl() {
        return treeurl;
    }

    public void setTreeurl(String treeurl) {
        this.treeurl = treeurl;
    }
}
